home *** CD-ROM | disk | FTP | other *** search
/ Skunkware 5 / Skunkware 5.iso / man / cat.6 / lev_comp.6 < prev    next >
Text File  |  1995-07-25  |  20KB  |  595 lines

  1.  
  2.  
  3.  
  4.      LLLLEEEEVVVV____CCCCOOOOMMMMPPPP((((6666))))        UUUUNNNNIIIIXXXX SSSSyyyysssstttteeeemmmm VVVV ((((22229999 DDDDeeeecccc 1111999999992222))))        LLLLEEEEVVVV____CCCCOOOOMMMMPPPP((((6666))))
  5.  
  6.  
  7.  
  8.      NNNNAAAAMMMMEEEE
  9.           lev_comp - NetHack special levels compiler
  10.  
  11.      SSSSYYYYNNNNOOOOPPPPSSSSIIIISSSS
  12.           lllleeeevvvv____ccccoooommmmpppp [ ----wwww ] [ _f_i_l_e_s ]
  13.  
  14.           If no arguments are given, it reads standard input.
  15.  
  16.      DDDDEEEESSSSCCCCRRRRIIIIPPPPTTTTIIIIOOOONNNN
  17.           _L_e_v__c_o_m_p is a special level compiler for NetHack version 3.1
  18.           and higher.  It takes description files as arguments and
  19.           produces level files that can be loaded by NetHack at
  20.           runtime.
  21.  
  22.           The purpose of this tool is to provide NetHack
  23.           administrators and implementors with a convenient way for
  24.           adding special levels to the game, or modifying existing
  25.           ones, without having to recompile the entire world.
  26.  
  27.           The ----wwww option causes _l_e_v__c_o_m_p to perform extra checks on the
  28.           level and display extra warnings, however these warnings are
  29.           sometimes superfluous, so they are not normally displayed.
  30.  
  31.  
  32.      GGGGRRRRAAAAMMMMMMMMAAAARRRR
  33.           file            : /* nothing */
  34.                           | levels
  35.  
  36.           levels          : level
  37.                           | level levels
  38.  
  39.           level           : maze_level
  40.                           | room_level
  41.  
  42.           maze_level      : maze_def flags lev_init messages regions
  43.  
  44.           room_level      : level_def flags lev_init messages
  45.                             rreg_init rooms corridors_def
  46.  
  47.           level_def       : "LEVEL" ':' string
  48.  
  49.           lev_init        : /* nothing */
  50.                           | "INIT_MAP" ':' fgtyp ',' bgtyp ',' smooth ','
  51.                             joined ',' light_state ',' walled
  52.  
  53.           fgtyp           : CHAR /* a MAP map_contents character */
  54.  
  55.           bgtyp           : CHAR /* a MAP map_contents character */
  56.  
  57.           smooth          : boolean
  58.  
  59.           joined          : boolean
  60.  
  61.  
  62.  
  63.      Page 1                                           (printed 7/7/95)
  64.  
  65.  
  66.  
  67.  
  68.  
  69.  
  70.      LLLLEEEEVVVV____CCCCOOOOMMMMPPPP((((6666))))        UUUUNNNNIIIIXXXX SSSSyyyysssstttteeeemmmm VVVV ((((22229999 DDDDeeeecccc 1111999999992222))))        LLLLEEEEVVVV____CCCCOOOOMMMMPPPP((((6666))))
  71.  
  72.  
  73.  
  74.           walled          : boolean | "random"
  75.  
  76.           flags           : /* nothing */
  77.                           | "FLAGS" ':' flag_list
  78.  
  79.           flag_list       : flag_type
  80.                           | flag_type ',' flag_list
  81.  
  82.           flag_type       : "noteleport" | "hardfloor" | "nommap"  | "shortsighted"
  83.  
  84.           messages        : /* nothing */
  85.                           | message messages
  86.  
  87.           message         : "MESSAGE" ':' STRING
  88.  
  89.           rreg_init       : /* nothing */
  90.                           | rreg_init init_rreg
  91.  
  92.           init_rreg       : "RANDOM_OBJECTS" ':' object_list
  93.                           | "RANDOM_MONSTERS" ':' monster_list
  94.  
  95.           rooms           : /* nothing */
  96.                           | roomlist
  97.  
  98.           roomlist        : aroom
  99.                           | aroom rooms
  100.  
  101.           corridors_def   : random_corridors
  102.                           | corridors
  103.  
  104.           random_corridors: "RANDOM_CORRIDOR"
  105.  
  106.           corridors       : /* nothing */
  107.                           | corridors corridor
  108.  
  109.           corridor        : "CORRIDOR" ':' corr_spec ',' corr_spec
  110.                           | "CORRIDOR" ':' corr_spec ',' INTEGER
  111.  
  112.           corr_spec       : '(' INTEGER ',' direction ',' door_pos ')'
  113.  
  114.           direction       : "north" | "south" | "east" | "west"
  115.  
  116.           aroom           : room_def room_details
  117.                           | subroom_def room_details
  118.  
  119.           subroom_def     : "SUBROOM" ':' room_type ',' light_state ','
  120.                             subroom_pos ',' room_size ',' string
  121.  
  122.           room_def        : "ROOM" ':' room_type ',' light_state ','
  123.                             room_pos ',' room_align ',' room_size
  124.  
  125.           room_pos        : '(' INTEGER ',' INTEGER ')'
  126.  
  127.  
  128.  
  129.      Page 2                                           (printed 7/7/95)
  130.  
  131.  
  132.  
  133.  
  134.  
  135.  
  136.      LLLLEEEEVVVV____CCCCOOOOMMMMPPPP((((6666))))        UUUUNNNNIIIIXXXX SSSSyyyysssstttteeeemmmm VVVV ((((22229999 DDDDeeeecccc 1111999999992222))))        LLLLEEEEVVVV____CCCCOOOOMMMMPPPP((((6666))))
  137.  
  138.  
  139.  
  140.                           | "random"
  141.  
  142.           subroom_pos     : '(' INTEGER ',' INTEGER ')'
  143.                           | "random"
  144.  
  145.           room_align      : '(' h_justif ',' v_justif ')'
  146.                           | "random"
  147.  
  148.           room_size       : '(' INTEGER ',' INTEGER ')'
  149.                           | "random"
  150.  
  151.           room_details    : /* nothing */
  152.                           | room_details room_detail
  153.  
  154.           room_detail     : room_name
  155.                           | room_chance
  156.                           | room_door
  157.                           | monster_detail
  158.                           | object_detail
  159.                           | trap_detail
  160.                           | altar_detail
  161.                           | fountain_detail
  162.                           | sink_detail
  163.                           | pool_detail
  164.                           | gold_detail
  165.                           | engraving_detail
  166.                           | stair_detail
  167.  
  168.           room_name       : "NAME" ':' string
  169.  
  170.           room_chance     : "CHANCE" ':' INTEGER
  171.  
  172.           room_door       : "DOOR" ':' secret ',' door_state ','
  173.                             door_wall ',' door_pos
  174.  
  175.           secret          : boolean
  176.                           | "random"
  177.  
  178.           door_wall       : direction
  179.                           | "random"
  180.  
  181.           door_pos        : INTEGER
  182.                           | "random"
  183.  
  184.           boolean         : "true" | "false"
  185.  
  186.           maze_def        : "MAZE" ':' string ',' filling
  187.  
  188.           filling         : CHAR
  189.                           | "random"
  190.           regions         : aregion
  191.                           | aregion regions
  192.  
  193.  
  194.  
  195.      Page 3                                           (printed 7/7/95)
  196.  
  197.  
  198.  
  199.  
  200.  
  201.  
  202.      LLLLEEEEVVVV____CCCCOOOOMMMMPPPP((((6666))))        UUUUNNNNIIIIXXXX SSSSyyyysssstttteeeemmmm VVVV ((((22229999 DDDDeeeecccc 1111999999992222))))        LLLLEEEEVVVV____CCCCOOOOMMMMPPPP((((6666))))
  203.  
  204.  
  205.  
  206.           aregion         : map_definition reg_init map_details
  207.  
  208.           map_definition  : "NOMAP"
  209.                           | map_geometry "MAP" map_contents "ENDMAP"
  210.  
  211.           map_geometry    : "GEOMETRY" ':' h_justif ',' v_justif
  212.  
  213.           map_contents    : /* see discussion below */
  214.  
  215.           h_justif        : "left" | "half-left" | "right" | "half-right"
  216.                           | "center"
  217.  
  218.           v_justif        : "top" | "bottom"
  219.                           | "center"
  220.  
  221.           reg_init        : /* nothing */
  222.                           | reg_init init_reg
  223.  
  224.           init_reg        : "RANDOM_OBJECTS" ':' object_list
  225.                           | "RANDOM_PLACES" ':' place_list
  226.                           | "RANDOM_MONSTERS" ':' monster_list
  227.  
  228.           object_list     : object
  229.                           | object ',' object_list
  230.  
  231.           monster_list    : monster
  232.                           | monster ',' monster_list
  233.  
  234.           place_list      : place
  235.                           | place ',' place_list
  236.  
  237.           map_details     : /* nothing */
  238.                           | map_details map_detail
  239.  
  240.           map_detail      : monster_detail
  241.                           | object_detail
  242.                           | door_detail
  243.                           | trap_detail
  244.                           | drawbridge_detail
  245.                           | region_detail
  246.                           | stair_region
  247.                           | portal_region
  248.                           | teleprt_region
  249.                           | branch_region
  250.                           | altar_detail
  251.                           | fountain_detail
  252.                           | mazewalk_detail
  253.                           | wallify_detail
  254.                           | ladder_detail
  255.                           | stair_detail
  256.                           | gold_detail
  257.                           | engraving_detail
  258.  
  259.  
  260.  
  261.      Page 4                                           (printed 7/7/95)
  262.  
  263.  
  264.  
  265.  
  266.  
  267.  
  268.      LLLLEEEEVVVV____CCCCOOOOMMMMPPPP((((6666))))        UUUUNNNNIIIIXXXX SSSSyyyysssstttteeeemmmm VVVV ((((22229999 DDDDeeeecccc 1111999999992222))))        LLLLEEEEVVVV____CCCCOOOOMMMMPPPP((((6666))))
  269.  
  270.  
  271.  
  272.                           | diggable_detail
  273.                           | passwall_detail
  274.  
  275.           monster_detail  : "MONSTER" ':' monster_c ',' m_name ',' coordinate
  276.                             monster_infos
  277.  
  278.           monster_infos   : /* nothing */
  279.                           | monster_infos monster_info
  280.  
  281.           monster_info    : ',' string
  282.                           | ',' mon_attitude
  283.                           | ',' mon_alertness
  284.                           | ',' alignment
  285.                           | ',' "m_feature" string
  286.                           | ',' "m_monster" string
  287.                           | ',' "m_object" string
  288.  
  289.           mon_attitude    : "peaceful" | "hostile"
  290.  
  291.           mon_alertness   : "asleep" | "awake"
  292.  
  293.           object_detail   : "OBJECT" ':' object_c ',' o_name ',' coordinate
  294.                             object_infos
  295.  
  296.           object_infos    : /* nothing */
  297.                           | ',' STRING ',' enchantment
  298.                           | ',' curse_state ',' enchantment ',' art_name
  299.  
  300.           curse_state     : "random"
  301.                           | "blessed" | "uncursed" | "cursed"
  302.  
  303.           enchantment     : INTEGER
  304.                           | "random"
  305.  
  306.           door_detail     : "DOOR" ':' door_state ',' coordinate
  307.  
  308.           trap_detail     : "TRAP" ':' trap_name ',' coordinate
  309.  
  310.           drawbridge_detail: "DRAWBRIDGE" ':' coordinate ','
  311.                             direction ',' door_state
  312.  
  313.           mazewalk_detail : "MAZEWALK" ':' coordinate ',' direction
  314.  
  315.           wallify_detail  : "WALLIFY"
  316.  
  317.           ladder_detail   : "LADDER" ':' coordinate ',' up_or_down
  318.  
  319.           stair_detail    : "STAIR" ':' coordinate ',' up_or_down
  320.  
  321.           stair_region    : "STAIR" ':' lev_region ',' lev_region ',' up_or_down
  322.  
  323.           up_or_down:     : "up" | "down"
  324.  
  325.  
  326.  
  327.      Page 5                                           (printed 7/7/95)
  328.  
  329.  
  330.  
  331.  
  332.  
  333.  
  334.      LLLLEEEEVVVV____CCCCOOOOMMMMPPPP((((6666))))        UUUUNNNNIIIIXXXX SSSSyyyysssstttteeeemmmm VVVV ((((22229999 DDDDeeeecccc 1111999999992222))))        LLLLEEEEVVVV____CCCCOOOOMMMMPPPP((((6666))))
  335.  
  336.  
  337.  
  338.           portal_region   : "PORTAL" ':' lev_region ',' lev_region ',' string
  339.  
  340.           teleprt_region  : "TELEPORT_REGION" ':' lev_region
  341.                             ',' lev_region teleprt_detail
  342.  
  343.           branch_region   : "BRANCH" ':' lev_region ',' lev_region
  344.  
  345.           teleprt_detail  : /* empty */
  346.                           | ',' up_or_down
  347.  
  348.           lev_region      : region
  349.                           | "levregion"
  350.                             '(' INTEGER ',' INTEGER ',' INTEGER ',' INTEGER ')'
  351.  
  352.           fountain_detail : "FOUNTAIN" ':' coordinate
  353.  
  354.           sink_detail     : "SINK" ':' coordinate
  355.  
  356.           pool_detail     : "POOL" ':' coordinate
  357.  
  358.           diggable_detail : "NON_DIGGABLE" ':' region
  359.  
  360.           passwall_detail : "NON_PASSWALL" ':' region
  361.  
  362.           region_detail   : "REGION" ':' region ',' light_state ','
  363.                             room_type prefilled
  364.  
  365.           altar_detail    : "ALTAR" ':' coordinate ',' alignment ',' altar_type
  366.  
  367.           gold_detail     : "GOLD" ':' amount ',' coordinate
  368.  
  369.           engraving_detail: "ENGRAVING" ':' coordinate ','
  370.                             engraving_type ',' string
  371.  
  372.           monster_c       : monster
  373.                           | "random"
  374.                           | m_register
  375.  
  376.           object_c        : object
  377.                           | "random"
  378.                           | o_register
  379.  
  380.           m_name          : string
  381.                           | "random"
  382.  
  383.           o_name          : string
  384.                           | "random"
  385.  
  386.           trap_name       : string
  387.                           | "random"
  388.  
  389.           room_type       : string
  390.  
  391.  
  392.  
  393.      Page 6                                           (printed 7/7/95)
  394.  
  395.  
  396.  
  397.  
  398.  
  399.  
  400.      LLLLEEEEVVVV____CCCCOOOOMMMMPPPP((((6666))))        UUUUNNNNIIIIXXXX SSSSyyyysssstttteeeemmmm VVVV ((((22229999 DDDDeeeecccc 1111999999992222))))        LLLLEEEEVVVV____CCCCOOOOMMMMPPPP((((6666))))
  401.  
  402.  
  403.  
  404.                           | "random"
  405.  
  406.           prefilled       : /* empty */
  407.                           | ',' filling
  408.                           | ',' filling ',' irregular
  409.  
  410.           filling         : "filled" | "unfilled"
  411.  
  412.           irregular       : boolean /* irregular shaped room around region */
  413.  
  414.           coordinate      : coord
  415.                           | p_register
  416.                           | "random"
  417.  
  418.           door_state      : "open" | "closed" | "locked" | "nodoor" | "broken"
  419.                           | "random"
  420.  
  421.           light_state     : "lit" | "unlit"
  422.                           | "random"
  423.  
  424.           alignment       : "noalign" | "law" | "neutral" | "chaos"
  425.                           | a_register
  426.                           | "random"
  427.  
  428.           altar_type      : "sanctum" | "shrine" | "altar"
  429.                           | "random"
  430.  
  431.           p_register      : "place" '[' INTEGER ']'
  432.  
  433.           o_register      : "object" '[' INTEGER ']'
  434.  
  435.           m_register      : "monster" '[' INTEGER ']'
  436.  
  437.           a_register      : "align" '[' INTEGER ']'
  438.  
  439.           place           : coord
  440.  
  441.           monster         : CHAR
  442.  
  443.           object          : CHAR
  444.  
  445.           string          : STRING
  446.  
  447.           art_name        : STRING
  448.                           | "none"
  449.  
  450.           amount          : INTEGER
  451.                           | "random"
  452.  
  453.           engraving_type  : "dust" | "engrave" | "burn" | "mark"
  454.                           | "random"
  455.  
  456.  
  457.  
  458.  
  459.      Page 7                                           (printed 7/7/95)
  460.  
  461.  
  462.  
  463.  
  464.  
  465.  
  466.      LLLLEEEEVVVV____CCCCOOOOMMMMPPPP((((6666))))        UUUUNNNNIIIIXXXX SSSSyyyysssstttteeeemmmm VVVV ((((22229999 DDDDeeeecccc 1111999999992222))))        LLLLEEEEVVVV____CCCCOOOOMMMMPPPP((((6666))))
  467.  
  468.  
  469.  
  470.           coord           : '(' INTEGER ',' INTEGER ')'
  471.  
  472.           region          : '(' INTEGER ',' INTEGER ',' INTEGER ',' INTEGER ')'
  473.  
  474.           _N_O_T_E:
  475.           Lines beginning with '#' are considered comments.
  476.  
  477.           The contents of a "MAP" description of a maze is a rectangle
  478.           showing the exact level map that should be used for the
  479.           given part of a maze.  Each character in the map corresponds
  480.           to a location on the screen.  Different location types are
  481.           denoted using different ASCII characters.  The following
  482.           characters are recognized.  To give an idea of how these are
  483.           used, see the EXAMPLE, below.  The maximum size of a map is
  484.           normally 76 columns by 21 rows.
  485.  
  486.           '-'     horizontal wall
  487.           '|'     vertical wall
  488.           '+'     a doorway (state is specified in a DOOR declaration)
  489.           'A'     open air
  490.           'B'     boundary room location (for bounding unwalled irregular regions)
  491.           'C'     cloudy air
  492.           'I'     ice
  493.           'S'     a secret door
  494.           'H'     a secret corridor
  495.           '{'     a fountain
  496.           '\'     a throne
  497.           'K'     a sink (if SINKS is defined, else a room location)
  498.           '}'     a part of a moat or other deep water
  499.           'P'     a pool
  500.           'L'     lava
  501.           '#'     a corridor
  502.           '.'     a normal room location (unlit unless lit in a REGION declaration)
  503.           ' '     stone
  504.  
  505.      EEEEXXXXAAAAMMMMPPPPLLLLEEEE
  506.           Here is an example of a description file (a very simple
  507.           one):
  508.  
  509.           MAZE : "fortress", random
  510.           GEOMETRY : center , center
  511.           MAP
  512.           }}}}}}}}}
  513.           }}}|-|}}}
  514.           }}|-.-|}}
  515.           }|-...-|}
  516.           }|.....|}
  517.           }|-...-|}
  518.           }}|-.-|}}
  519.           }}}|-|}}}
  520.           }}}}}}}}}
  521.           ENDMAP
  522.  
  523.  
  524.  
  525.      Page 8                                           (printed 7/7/95)
  526.  
  527.  
  528.  
  529.  
  530.  
  531.  
  532.      LLLLEEEEVVVV____CCCCOOOOMMMMPPPP((((6666))))        UUUUNNNNIIIIXXXX SSSSyyyysssstttteeeemmmm VVVV ((((22229999 DDDDeeeecccc 1111999999992222))))        LLLLEEEEVVVV____CCCCOOOOMMMMPPPP((((6666))))
  533.  
  534.  
  535.  
  536.           MONSTER: '@', "Wizard of Yendor", (4,4)
  537.           OBJECT: '"', "Amulet of Yendor", (4,4)
  538.           # a hell hound flanking the Wiz on a random side
  539.           RANDOM_PLACES: (4,3), (4,5), (3,4), (5,4)
  540.           MONSTER: 'd', "hell hound", place[0]
  541.           # a chest on another random side
  542.           OBJECT: '(', "chest", place[1]
  543.           # a random dragon somewhere
  544.           MONSTER: 'D', random, random
  545.           # a random trap in the EAST end
  546.           TRAP: random, (6,4)
  547.           # an electric eel below the SOUTH end
  548.           MONSTER: ';', "electric eel", (4,8)
  549.           # make the walls non-diggable
  550.           NON_DIGGABLE: (0,0,8,8)
  551.           TELEPORT_REGION: lev_region(0,0,79,20), (0,0,8,8)
  552.  
  553.           This example will produce a file named "fortress" that can
  554.           be integrated into one of the numerous mazes of the game.
  555.  
  556.           Note especially the final, TELEPORT_REGION specification.
  557.           This says that level teleports or other non-stairway
  558.           arrivals on this level can land anywhere on the level except
  559.           the area of the map.  This shows the use of the
  560.           ``lev_region'' prefix allowed in certain region
  561.           specifications.  Normally, regions apply only to the most
  562.           recent MAP specification, but when prefixed with
  563.           ``lev_region'', one can refer to any area of the level,
  564.           regardless of the placement of the current MAP in the level.
  565.  
  566.      AAAAUUUUTTTTHHHHOOOORRRR
  567.           Jean-Christophe Collet, David Cohrs.
  568.  
  569.      SSSSEEEEEEEE AAAALLLLSSSSOOOO
  570.           dgn_comp(6), nethack(6)
  571.  
  572.      BBBBUUUUGGGGSSSS
  573.           Probably infinite.  Most importantly, still needs additional
  574.           bounds checking.
  575.  
  576.  
  577.  
  578.  
  579.  
  580.  
  581.  
  582.  
  583.  
  584.  
  585.  
  586.  
  587.  
  588.  
  589.  
  590.  
  591.      Page 9                                           (printed 7/7/95)
  592.  
  593.  
  594.  
  595.